package com.gitee.jiaojinxin.oauth2.resource.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.security.Principal;

@RestController
public class CurrUserController {

    @GetMapping("user")
    public Principal getCurrentUser(Principal principal){
        return principal;
    }
}
